package com.sykj.zhangzhenyu.controller;

import com.sykj.util.ResponseResult;
import com.sykj.zhangzhenyu.bean.CwInout;
import com.sykj.zhangzhenyu.service.CwInoutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 黄泉碧落
 * @date 2020/5/19 10:33
 */
@RestController
public class InController {

    @Autowired
    private CwInoutService cwInoutService;


    /**
     *
     * @param cwInout
     * @return 财务
     *  我的收支
     *  按照收支类别 支付方式 开始时间 结束时间 案件类型 综合查询
     */
    @GetMapping(value = "/inout/sz")
    public ResponseResult queryListed(CwInout cwInout){

    List<CwInout>cwInoutList= cwInoutService.queryListed(cwInout);

              if (cwInoutList==null){
                  return  new ResponseResult(404,"查询失败",false,null);
              }

            return  new ResponseResult(200,"查询成功",true,cwInoutList);
    }
}
